// 添加path模块导入
const path = require('path');

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  // 配置页面文件的位置
  pageExtensions: ['tsx', 'ts'],
  // 确保Next.js正确解析src目录
  webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
    // 添加src目录到解析路径
    config.resolve.modules.push(path.resolve('./src'));
    return config;
  },
};

module.exports = nextConfig;